<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Hello</title>
</head>

<body>
    <button id="sendBtn">发送消息</button>
</body>
<script src="http://10.222.29.179:3000/socket.io/socket.io.js"></script>
<script type="text/javascript">
    //与服务器进行连接
    var socket=io.connect('ws://10.222.29.179:3000'),
        send=document.getElementById('sendBtn');


    send.onclick=function(){
        socket.emit('new_verify', 'hello!');
    }
</script>

</html>
